<template>
<div class=''>
    <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>权限管理</el-breadcrumb-item>
        <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片 -->
    <el-card>
        <el-table :data="rightsList" border stripe>
            <el-table-column type="index" label="序号"></el-table-column>
            <el-table-column label="权限名称" prop="authName"></el-table-column>
            <el-table-column label="路径" prop="path"></el-table-column>
            <el-table-column label="权限等级" prop="level">
                <template slot-scope="scope">
                    <el-tag :type="typeClass[scope.row.level].type">{{typeClass[scope.row.level].name}}</el-tag>
                </template>
            </el-table-column>
        </el-table>
    </el-card>
</div>
</template>
<script>
export default {
    name: 'rights',
    data(){
        return {
            rightsList:[
            {
                authName:'一般权限',
                path:'rights',
                level:0
            },
            {
                authName:'一般权限',
                path:'rights',
                level:1
            },
            {
                authName:'一般权限',
                path:'rights',
                level:2
            },
            {
                authName:'一般权限',
                path:'rights',
                level:3
            },
            {
                authName:'一般权限',
                path:'rights',
                level:4
            }
            ],
            typeClass:[
                { text: 0, name: '一级', type: '' },
                { text: 1, name: '二级', type: 'info' },
                { text: 2, name: '三级', type: 'success' },
                { text: 3, name: '四级', type: 'danger' },
                { text: 4, name: '五级', type: 'warning' }
            ]
        }
    },
    created () {
        // 获取列表信息
        // this.getList()
    },
    computed:{},
    methods:{
        // 获取列表信息
        // async getList(){
        //     await this.$htttp.get('rights/list')
        // }
    }
}
</script>
<style lang='less' scoped>
</style>